package com.barunlab.ems.model;

import java.io.Serializable;

import com.barunlab.ems.constants.ResultType;

public class EmsResult implements Serializable {
	private static final long serialVersionUID = -7516541231472389552L;
	
	private ResultType 	type;
	private int 		code;
	private String 		reason;
	private Object[] 	params;
	
	public EmsResult() {
		this(ResultType.FAIL, 0, "", null);
	}
	
	public EmsResult(ResultType type, int code, String reason, Object[] params) {
		this.type 	= type;
		this.code 	= code;
		this.reason = reason;
		this.params = params;
	}

	public ResultType getType() {
		return type;
	}

	public void setType(ResultType type) {
		this.type = type;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
	
	public Object[] getParams() {
		return params;
	}

	public void setParams(Object[] params) {
		this.params = params;
	}
}
